/*
 * @Author: '小羊今晚不睡觉' '2226764294@qq.com'
 * @Date: 2025-09-23 09:08:18
 * @LastEditors: '小羊今晚不睡觉' '2226764294@qq.com'
 * @LastEditTime: 2025-09-23 09:09:08
 * @FilePath: \优工侠后台管理系统\src\api\system\login.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { http } from '@/utils/http/axios';
import { RequestEnum } from '@/enums/httpEnum';

export interface BasicResponseModel<T = any> {
  code: number;
  message: string;
  data: T;
}

/**
 * @description: 用户登录
 */
export function login(params) {
  return http.request<BasicResponseModel>(
    {
      url: '/v1/admin/login',
      method: RequestEnum.POST,
      params,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
    },
    {
      isTransformResponse: false,
    }
  );
}
